.\"   $Id: flattenlofig.3,v 1.1 2002/03/08 13:51:02 fred Exp $
.\" @(#)flattenlofig.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot
.if t \{\
.so man1/alc_contents.mac
.XS \n%
.ti 0.2i
flattenlofig
.XE
.XS3 \n%
.ti 0.2i
flattenlofig
.XE3 \}
.TH FLATTENLOFIG 3 "October 1, 1997" "ASIM/LIP6" "MBK LOGICAL UTILITY FUNCTIONS"
.SH NAME
flattenlofig \- flatten a instance in a logical figure 
.so man1/alc_origin.1
.SH SYNOPSIS
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mlo.h"
void flattenlofig(ptfig, insname, concat)
lofig_list \(**ptfig;
char \(**insname;
char concat;
.ft R
.fi
.SH PARAMETERS
.TP 20
\fIptfig\fP
Pointer to a logical figure
.TP
\fIinsname\fP
Name of the instance to be flattened
.TP
\fIconcat\fP
Name generation mode
.SH DESCRIPTION
\fBflattenlofig\fP flattens the instance called \fIinsname\fP in the figure
pointed to by \fIptfig\fP. Flattening means incorporating the
contents of the instance in the figure and removing it from its instance list.
.br
the \fIconcat\fP argument can take either the value \fBYES\fP in which case the
name of the objects coming from the instance are named
\fIinsname'X'objectname\fP, where \fI'X'\fP is the caracter set int the
\fBMBK_SEPAR\fP(1) environment variable, or the value \fBNO\fP, and then the
object name remains inchanged. This is quite dangerous since name unicity is
no more warrantied, and may cause the flatten to fail. See \fBMBK_SEPAR\fP(1),
\fBmbkenv\fP(3) and \fBconcatname\fP(3) for details.
.SH ERRORS
No errors can directly result from a call to \fBflattenlofig\fP, but since it
uses many other mbk functions, it may be an error starting point.
.SH EXAMPLE
.ta 3n 6n 9n 12n 15n 18n 21n
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mlo.h"
void flatten_na2_y_s(ptfig)
lofig_list \(**ptfig;
{
loins_list \(**pt;
	for (pt = ptfig\->LOINS; pt; pt = pt\->NEXT) /\(** scan instance list \(**/
		if (!strcmp(pt\->FIGNAME, "na2_y"))
			flattenlofig(ptfig, pt\->INSNAME, NO);
}
.ft R
.fi
.SH SEE ALSO
.BR mbk (1),
.BR mbkenv (3),
.BR lofig (3),
.BR addlofig (3),
.BR getlofig (3),
.BR dellofig (3),
.BR loadlofig (3),
.BR savelofig (3),
.BR rflattenlofig (3),
.BR MBK_SEPAR (1).


.so man1/alc_bug_report.1

